package com.caterina.activities;

import java.awt.Container;

import com.caterina.activityManager.CActivity;
import com.caterina.runtime.CaterinaRuntime;

import controllers.ManagerTask.TaskType;

public class LogoutActivity extends CActivity{
	public LogoutActivity(Container parent) {
		super("LOGGING_OUT",parent);
		super.setCBarVisible(false);
		super.setCBarQueryesEnabled(false);
	}
	@Override
	public void onStart() {
		this.putTask(TaskType.USER_LOGOUT);
	}
	@Override
	public void onData(TaskType task, Object data) {
		CaterinaRuntime.restart();
	}
	@Override
	public void onError(TaskType task, Exception e) {
		this.getActivityManager().switchActivity(new SpringBoardActivity(this.getParentContainer()));
	}
	private static final long serialVersionUID = 1L;
}
